import request from "@/utils/request";

//获取地址列表
export function getAreaList(data) {
  return request({
    url: "/inquiry/areaList",
    method: "post",
    data
  });
}

//获取我的客户列表
export function getCustomerList(data) {
  return request({
    url: "/inquiry/customerList",
    method: "post",
    data
  });
}

//获取客户名称详情
export function getCustomerCheckData(data) {
  return request({
    url: "customer/check/data",
    method: "post",
    data
  });
}

//获取销售询价列表
export function getPriceList(data) {
  return request({
    url: "/inquiry/inquiryPriceList",
    method: "post",
    data
  });
}

//获取询价详情
export function getInquiryDetail(data) {
  return request({
    url: "/inquiry/inquiryDetail",
    method: "post",
    data
  });
}

//获取采购询价列表
export function getChargeList(data) {
  return request({
    url: "/inquiry/chargeInquiryList",
    method: "post",
    data
  });
}

//询价日志
export function getInquiryLog(data) {
  return request({
    url: "/inquiry/inquiryLog",
    method: "post",
    data
  });
}

//采购报价日志
export function goodsPriceLog(data) {
  return request({
    url: "inquiry/goodsPriceLog",
    method: "post",
    data
  });
}

//发起询价提交
export function addInquiryPrice(data) {
  return request({
    url: "/inquiry/addInquiryPrice",
    method: "post",
    data
  });
}

//提交低价
export function commitInquiryIntroduce(data) {
  return request({
    url: "/inquiry/inquiryIntroduce",
    method: "post",
    data
  });
}

//报价确认
export function commitInquiryPrice(data) {
  return request({
    url: "/inquiry/inquiryPrice",
    method: "post",
    data
  });
}

//运费报价列表
export function logisticsPriceList(data) {
  return request({
    url: "/inquiry/logisticsPriceList",
    method: "post",
    data
  });
}

// 获取上一条运费记录
export function suggestFreightAPI(data) {
  return request({
    url: "inquiry/suggestFreight",
    method: "post",
    data
  });
}

//运费报价提交
export function freightInput(data) {
  return request({
    url: "/inquiry/freightInput",
    method: "post",
    data
  });
}

// 获取待填运费列表
export function getWaitFreightListAPI(data) {
  return request({
    url: "/inquiry/waitInputFreightOrders",
    method: "post",
    data
  });
}
// 提交待填运费(摩塑网)
export function inputOrderFreightAPI(data) {
  return request({
    url: "/inquiry/inputOrderFreight",
    method: "post",
    data
  });
}

// 询价设置 操作类型(询运费：inquiryFreight,还价：inquiryReduce,未成交：unOrder)//还价的价格(还价操作需填)
// 取消询价：cancel,确认价格：priceSure  //未成交原因(未成交操作时需填)
export function inquiryOperate(data) {
  return request({
    url: "/inquiry/inquiryOperate",
    method: "post",
    data
  });
}

//询价批量询运费
export function batchInquiryFreight(data) {
  return request({
    url: "/inquiry/batchInquiryFreight",
    method: "post",
    data
  });
}

export function createOrder(data) {
  return request({
    url: "/inquiry/createOrder",
    method: "post",
    data
  });
}

// 供货方列表
export function getFromCompanyList(data) {
  return request({
    url: "/inquiry/fromCompanyList",
    method: "post",
    data
  });
}

// 商品列表
export function getGoodsList(data) {
  return request({
    url: "/inquiry/goodsDataList",
    method: "post",
    data
  });
}

// 一口价询运费
export function fixedPriceFreight(data) {
  return request({
    url: "/inquiry/inquiryFreight",
    method: "post",
    data
  });
}

// 获取下单商品内容
export function getPreOrderContent(data) {
  return request({
    url: "/inquiry/preOrderContent",
    method: "post",
    data
  });
}

// 获取我的指定牌号的货权列表
export function getMyGoodsOwnerShipAPI(data) {
  return request({
    url: "/psMerge/myGoodsOwnerShip",
    method: "post",
    data
  });
}

// 新增客户
export function addCustomer(data) {
  return request({
    url: "/customer/update",
    method: "post",
    data
  });
}

// 获取客户详情数据
export function getCustomerDetail(data) {
  return request({
    url: "/customer/detail",
    method: "post",
    data
  });
}

// 获取客户 客户列表数据
export function getCompanyList(data) {
  return request({
    url: "/customer/list",
    method: "post",
    data
  });
}

// 新增或修改客户地址
export function updateAddress(data) {
  return request({
    url: "/address/update",
    method: "post",
    data
  });
}

// 客户公司列表
export function customerList(data) {
  return request({
    url: "/customer/list",
    method: "post",
    data
  });
}

// 销售订单列表
export function getOrderList(data) {
  return request({
    url: "/inquiry/getOrderList",
    method: "post",
    data
  });
}

// 销售订单详情
export function getOrderInfo(data) {
  return request({
    url: "/inquiry/orderInfo",
    method: "post",
    data
  });
}

// 确认订单流程
export function circulationOrder(data) {
  return request({
    url: "/inquiry/circulationOrder",
    method: "post",
    data
  });
}

// 客户详情数据
export function customerDetail(data) {
  return request({
    url: "/customer/detail",
    method: "post",
    data
  });
}

// 客户合同详情
export function orderData(data) {
  return request({
    url: "/customer/order/data",
    method: "post",
    data
  });
}

// 采购商品报价 批量报价
export function goodsPricePublish(data) {
  return request({
    url: "/inquiry/goodsPricePublish",
    method: "post",
    data
  });
}

// 采购商品报价
export function warehouseList(data) {
  return request({
    url: "/inquiry/warehouseList",
    method: "post",
    data
  });
}

// 增加商品
export function addGoodsData(data) {
  return request({
    url: "/inquiry/goodsDataEdit",
    method: "post",
    data
  });
}

// 排序
export function goodsSortSet(data) {
  return request({
    url: "/inquiry/goodsSortSet",
    method: "post",
    data
  });
}

export function chargeList(data) {
  return request({
    url: "/customer/charge/data",
    method: "post",
    data
  });
}
// 客户 收货地址
export function customerAddress(data) {
  return request({
    url: "/inquiry/addressList",
    method: "post",
    data
  });
}

// 客户地址创建/修改
export function addressUpdate(data) {
  return request({
    url: "/inquiry/addressEdit",
    method: "post",
    data
  });
}

// 客户地址删除
export function addressDelete(data) {
  return request({
    url: "/inquiry/addressDel",
    method: "post",
    data
  });
}

//客户配制
export function getCustomerSetting(data) {
  return request({
    url: "/inquiry/config",
    method: "post",
    data
  });
}

//订单发货记录
export function ordDeliverGoods(data) {
  return request({
    url: "/inquiry/ordPackageList",
    method: "post",
    data
  });
}

//订单收款记录
export function ordPayList(data) {
  return request({
    url: "/inquiry/ordPayList",
    method: "post",
    data
  });
}

//业务员列表
export function salesmanList(data) {
  return request({
    url: "/inquiry/salesmanList",
    method: "post",
    data
  });
}

//业务员列表
export function customerUsers(data) {
  return request({
    url: "/inquiry/customerUsers",
    method: "post",
    data
  });
}

//采购商品管理各数据 数量
export function goodsDataSummary(data) {
  return request({
    url: "/inquiry/goodsDataSummary",
    method: "post",
    data
  });
}

//报价记录ID获取报价信息
export function goodsPriceListInfo(data) {
  return request({
    url: "/inquiry/goodsPriceListInfo",
    method: "post",
    data
  });
}

//未成交原因列表
export function unOrderReasonList(data) {
  return request({
    url: "/inquiry/unOrderReasonList",
    method: "post",
    data
  });
}

//未成交原因列表
export function originalContractPic(data) {
  return request({
    url: "/inquiry/originalContractPic",
    method: "post",
    data
  });
}

//获取商品报价分类列表
export function goodsPriceCategoryList(data) {
  return request({
    url: "/inquiry/goodsPriceCategoryList",
    method: "post",
    data
  });
}

//获取我关注的商品分类列表
export function myMaterialClassList(data) {
  return request({
    url: "/inquiry/myMaterialClassList",
    method: "post",
    data
  });
}

//设置我关注的商品价格分类
export function setAttentionCategoryId(data) {
  return request({
    url: "/inquiry/setAttentionCategoryId",
    method: "post",
    data
  });
}

// 类型描述下拉列表
export function contractRemark(data) {
  return request({
    url: "/inquiry/contractRemark",
    method: "post",
    data
  });
}

// 结算方式列表
export function paymentTypeList(data) {
  return request({
    url: "/inquiry/paymentTypeList",
    method: "post",
    data
  });
}
// 结算方式列表新
export function paymentTypeListAPI(data) {
  return request({
    url: "/inquiry/payTypeList",
    method: "post",
    data
  });
}

// 获取关联客户
export function relationCustomers(data) {
  return request({
    url: "/inquiry/relationCustomers",
    method: "post",
    data
  });
}
// 获取指定产品线的协助人
export function getAssistUserListAPI(data) {
  return request({
    url: "/inquiry/assistUserList",
    method: "post",
    data
  });
}
// 批量修改报价
export function batchEditPriceAPI(data) {
  return request({
    url: "/inquiry/batchEditPrice",
    method: "post",
    data
  });
}
// 获取客户最新的订单询盘数据
export function getLastInquiryAPI(data) {
  return request({
    url: "/inquiry/getLastInquiry",
    method: "post",
    data
  });
}
// 获取最近下单的询盘商品和发货地址
export function getGoodsAreaAPI(data) {
  return request({
    url: "/inquiry/getGoodsArea",
    method: "post",
    data
  });
}
// 获取销售部门列表
export function getSaleDepartListAPI(data) {
  return request({
    url: "/inquiry/saleDepartList",
    method: "post",
    data
  });
}
// 获取业务员列表
export function getSaleUserListAPI(data) {
  return request({
    url: "/inquiry/saleUserList",
    method: "post",
    data
  });
}
// 推送至第三方
export function pushInquiryToGxMoreAPI(data) {
  return request({
    url: "/inquiry/pushInquiryToGxMore",
    method: "post",
    data
  });
}


// 查看客户的成交统计
export function customerOrderInfo(data) {
  return request({
    url: "/customerLatest/customerOrderInfo",
    method: "post",
    data
  });
}

// 分享点击次数累计
export function addShareClick(data) {
  return request({
    url: "/inquiry/addShareClick",
    method: "post",
    data
  });
}

// 分享供应商报价信息页面数据
export function getSupplierPriceInfo(data) {
  return request({
    url: "/inquiry/getSupplierPriceInfo",
    method: "post",
    data
  });
}

// 添加供应商报价
export function addSupplierPrice(data) {
  return request({
    url: "/inquiry/addSupplierPrice",
    method: "post",
    data
  });
}

// 供应商报价列表
export function getInquirySupplierPriceList(data) {
  return request({
    url: "/inquiry/getInquirySupplierPriceList",
    method: "post",
    data
  });
}

// 获取报价来源列表
export function supplierPriceList(data) {
  return request({
    url: "/inquiry/supplierPriceList",
    method: "post",
    data
  });
}

// 获取报价来源列表
export function freightList(data) {
  return request({
    url: "/inquiry/freightList",
    method: "post",
    data
  });
}

//  散货报价
export function bulkCargoFreight(data) {
  return request({
    url: "/inquiry/bulkCargoFreight",
    method: "post",
    data
  });
}

//  采购订单类型
export function editPurchaseCustomerType(data) {
  return request({
    url: "/inquiry/editPurchaseCustomerType",
    method: "post",
    data
  });
}

//  订单分类列表
export function customerTypeOrderList(data) {
  return request({
    url: "/inquiry/customerTypeOrderList",
    method: "post",
    data
  });
}

//  订单分类调整
export function editOrderCustomerType(data) {
  return request({
    url: "/inquiry/editOrderCustomerType",
    method: "post",
    data
  });
}

//  商城订单
export function mallOrderList(data) {
  return request({
    url: "/inquiry/mallOrderList",
    method: "post",
    data
  });
}

//  商城订单解绑
export function mallOrderOperate(data) {
  return request({
    url: "/inquiry/mallOrderOperate",
    method: "post",
    data
  });
}

//  商城订单详情
export function mallSnInfo(data) {
  return request({
    url: "/inquiry/mallSnInfo",
    method: "post",
    data
  });
}

//  批量未成交
export function batchSetUnOrder(data) {
  return request({
    url: "/inquiry/batchSetUnOrder",
    method: "post",
    data
  });
}
